Scalar (Edition Based) License Model

Developing Applications Using The SoftwareShield System > Creating Licensing Solutions > Available License Models > Scalar (Edition Based) License Model

## Scalar (Edition Based) License Model

This model allows you to deliver a single deployment of your software that can "behave" in one of several different "modes" or "editions". The editions are normally "scalar" because one edition has all the features of the edition before it - plus some.

### Overview - How to Integrate the Scalar (Edition Based) License Model Into Your Application

There are at least two basic approaches to implementing the Scalar (Edition Based) License Model:

1. Use multiple General Use Authorization Definition to represent your editions - one for each.

2. Use a single General Use Authorization Definition and interpret the Stored Parameter Value in that definition as a representation of your editions.

Either way, the basic premise is largely the same:

1. The first step is to ensure that your license has the necessary Authorization Definitions built into it. Depending on your approach, create one "master" General Use Authorization Definition that uses a parameter - or one for each edition (parameter optional).

2. Once you are satisfied with your license, compile a distributed copy of it. The distributed copy is encrypted and compressed and only contains absolutely necessary information for the enforcement of your license. Place a copy of this distributed license in your applications directory. If you have decided to use steganographic alias files, make sure that they are also in the application directory. Have a look at the programming notes file that the SoftwareShield License Manager creates for your specific license. This will make your programming a little easier by supplying you with the code you will need to invoke the start up event. Please see Deploying the License for Your Application for more detailed information about deploying your license.

3. Next, in your programs startup event (main form load etc.) create an instance of the ClientProtector object and immediately call its StartUp function. You will have to pass specific parameters such as the license name, main license file password, and the finger print options code - but this code will have been already written for your convenience when you compiled your license - just look in the programming notes file created by the SoftwareShield License Manager. Have a look at the exact details of the StartUp function for more information on making this call.

4. Now, once the ClientProtector StartUp call returns and the license state is as you expect it to be - determine which version if any is activated:

1. Call GetAuthorizationDetails or GetAuthorizationDetailsEx for the General Use Authorization Definition(s) you have defined to hold the state of your editions.

2. Check from the "top" (most comprehensive) of your edition list to the "bottom" (least comprehensive) to determine if the user has a particular edition. When you check from top-to-bottom, this allows the user to upgrade between editions without you having to be concerned in your program code about "removing" previous editions.

1. If you are using the first approach, check the Activated state of each edition, top to bottom, to determine which edition (if any) is activated

2. If you are using the second approach, interpret both the Activated state and the stored parameter value (either as a bit-field or a simple single value) to determine which edition (if any) is activated.